﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using nSL.Config;
using nSL.Libs;
using Dolinay;

namespace nSL
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            //set current program dialog language.
            Common.CURRENT_LANGUAGE = Common.Lang.Tha;



            Zyg40.Database.ConnectServer.ConnectionString = Query.SQLConnectionString("202.57.128.228", "sa", "nextwavermay", "Business_Knowledge");
            UC.WhoRU who = new UC.WhoRU();
            ShowControl(who);

        }

        void ddt_DeviceArrived(object sender, DriveDetectorEventArgs e)
        {
            //USBKey.WriteNewTokenFile("F", "1211000001472694");
            cMessage m = new cMessage(e.Drive +" has been arrived",cMessage.BUTTON_TYPE.OK);
            m.ShowDialog();
        }
        public void ShowControl(UserControl uc)
        {
            pageTransitionControl.ShowPage(uc);
        }

        private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            DirectoryHelper.Empty(Common.CURRENT_APP_PATH+"\\Temp");
        }
    }


}
